package com.patterns.java.Iterator;

/**
 * 迭代器入口类
 *
 * @author 三多
 * @Time 2021/10/13
 */
public class IteratorDemo {
    public static void main(String[] args) {
        NameContainer nameContainer = new NameContainer();
        for (Iterator iterator = nameContainer.getIterator();iterator.hasNext();) {
            System.out.println("Name : " + iterator.next());
        }
    }
}
